<extend name="./Template/Admin/Common/panel-block.html"/>
<block name="body">
    <form class="layui-form layui-box" action="{:U('')}" onsubmit="return <if condition='$onsubmit'>{$onsubmit}<else/>subSearch(this)</if>" >
    <include file="./Template/Common/public-search-list.html" />
    </form>
    <table class="layui-hidden" id="{$option['id']}" lay-filter="{$option['id']}"></table>
</block>
<block name="script">
    {//php-js文件之间通讯}
    <script type="text/html" role="treeGrid">
        {$option|json_encode}
    </script>
    <script type="text/html" role="table">
        {$option|json_encode}
    </script>
    <icy8:fetch var="toolbarTpl" />

    <script type="text/html" role="onToolbar">
        <icy8:fetch var="onToolbar" />
    </script>
    <script type="text/html" role="onCheckbox">
        <icy8:fetch var="onCheckbox" />
    </script>
    <script type="text/html" role="onEdit">
        <icy8:fetch var="onEdit" />
    </script>
    <script type="text/html" role="onRow">
        <icy8:fetch var="onRow" />
    </script>
    <script type="text/html" role="onTool">
        <icy8:fetch var="onTool" />
    </script>
    <script type="text/html" role="onSort">
        <icy8:fetch var="onSort" />
    </script>
    <!--<js file="__JS__/Controller/loadTreeGrid.js" />-->
    <js file="__JS__/Controller/loadTable.js" />
    <script type="text/javascript">
        function subSearch(obj) {
            var where = {};
            var data = $(obj).serializeArray();
            for (var k in data){
                where[ data[k].name ] = data[k].value;
            }
            layui.table.reload("{$option['id']}",{
                where:where,
            });
            return false;
        }
    </script>
</block>